{% extends "h:templates/layouts/admin.html.jinja2" %}

{% set page_id = 'mailer' %}
{% set page_title = 'Mailer' %}

{% block content %}

{% if taskid %}
  <div class="alert alert-info alert-dismissable" role="alert">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <p>Task submitted with ID: <code>{{ taskid }}</code></p>
  </div>
{% endif %}

  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">Send a test email</h3>
    </div>
    <div class="panel-body">
      <form method="POST" action="{{ request.route_path('admin.mailer_test') }}" class="form-inline">
        <input type="hidden" name="csrf_token" value="{{ get_csrf_token() }}">
        <div class="form-group">
          <label for="recipient">Recipient</label>
          <input type="text" class="form-control" name="recipient">
          <input type="submit" class="btn btn-default" value="Send">
        </div>
      </form>
    </div>
  </div>

{% endblock %}
